{
 "nbformat": 4,
 "nbformat_minor": 2,
 "metadata": {
  "language_info": {
   "name": "python",
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "version": "3.8.1-final"
  },
  "orig_nbformat": 2,
  "file_extension": ".py",
  "mimetype": "text/x-python",
  "name": "python",
  "npconvert_exporter": "python",
  "pygments_lexer": "ipython3",
  "version": 3,
  "kernelspec": {
   "name": "python38164bitd052c09db5ae4d95a4546224ef2f9e79",
   "display_name": "Python 3.8.1 64-bit"
  }
 },
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": "used_car_sample_submit.csv  used_car_train_20200313.csv\nused_car_testA_20200313.csv\n"
    }
   ],
   "source": [
    "# 查看数据文件目录  list datalab files\n",
    "!ls datalab/"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "## 基础工具\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import warnings\n",
    "import matplotlib\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "from scipy.special import jn\n",
    "from IPython.display import display, clear_output\n",
    "import time\n",
    "\n",
    "warnings.filterwarnings('ignore')\n",
    "%matplotlib inline\n",
    "\n",
    "## 模型预测的\n",
    "from sklearn import linear_model\n",
    "from sklearn import preprocessing\n",
    "from sklearn.svm import SVR\n",
    "from sklearn.ensemble import RandomForestRegressor,GradientBoostingRegressor\n",
    "\n",
    "## 数据降维处理的\n",
    "from sklearn.decomposition import PCA,FastICA,FactorAnalysis,SparsePCA\n",
    "\n",
    "import lightgbm as lgb\n",
    "import xgboost as xgb\n",
    "\n",
    "## 参数搜索和评价的\n",
    "from sklearn.model_selection import GridSearchCV,cross_val_score,StratifiedKFold,train_test_split\n",
    "from sklearn.metrics import mean_squared_error, mean_absolute_error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": "Train data shape: (150000, 31)\nTestA data shape: (50000, 30)\n"
    }
   ],
   "source": [
    "## 通过Pandas对于数据进行读取 (pandas是一个很友好的数据读取函数库)\n",
    "Train_data = pd.read_csv('datalab/used_car_train_20200313.csv', sep=' ')\n",
    "TestA_data = pd.read_csv('datalab/used_car_testA_20200313.csv', sep=' ')\n",
    "\n",
    "## 输出数据的大小信息\n",
    "print('Train data shape:',Train_data.shape)\n",
    "print('TestA data shape:',TestA_data.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "   SaleID    name   regDate  model  brand  bodyType  fuelType  gearbox  power  \\\n0       0     736  20040402   30.0      6       1.0       0.0      0.0     60   \n1       1    2262  20030301   40.0      1       2.0       0.0      0.0      0   \n2       2   14874  20040403  115.0     15       1.0       0.0      0.0    163   \n3       3   71865  19960908  109.0     10       0.0       0.0      1.0    193   \n4       4  111080  20120103  110.0      5       1.0       0.0      0.0     68   \n\n   kilometer  ...       v_5       v_6       v_7       v_8       v_9      v_10  \\\n0       12.5  ...  0.235676  0.101988  0.129549  0.022816  0.097462 -2.881803   \n1       15.0  ...  0.264777  0.121004  0.135731  0.026597  0.020582 -4.900482   \n2       12.5  ...  0.251410  0.114912  0.165147  0.062173  0.027075 -4.846749   \n3       15.0  ...  0.274293  0.110300  0.121964  0.033395  0.000000 -4.509599   \n4        5.0  ...  0.228036  0.073205  0.091880  0.078819  0.121534 -1.896240   \n\n       v_11      v_12      v_13      v_14  \n0  2.804097 -2.420821  0.795292  0.914762  \n1  2.096338 -1.030483 -1.722674  0.245522  \n2  1.803559  1.565330 -0.832687 -0.229963  \n3  1.285940 -0.501868 -2.438353 -0.478699  \n4  0.910783  0.931110  2.834518  1.923482  \n\n[5 rows x 31 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>SaleID</th>\n      <th>name</th>\n      <th>regDate</th>\n      <th>model</th>\n      <th>brand</th>\n      <th>bodyType</th>\n      <th>fuelType</th>\n      <th>gearbox</th>\n      <th>power</th>\n      <th>kilometer</th>\n      <th>...</th>\n      <th>v_5</th>\n      <th>v_6</th>\n      <th>v_7</th>\n      <th>v_8</th>\n      <th>v_9</th>\n      <th>v_10</th>\n      <th>v_11</th>\n      <th>v_12</th>\n      <th>v_13</th>\n      <th>v_14</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>0</td>\n      <td>736</td>\n      <td>20040402</td>\n      <td>30.0</td>\n      <td>6</td>\n      <td>1.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>60</td>\n      <td>12.5</td>\n      <td>...</td>\n      <td>0.235676</td>\n      <td>0.101988</td>\n      <td>0.129549</td>\n      <td>0.022816</td>\n      <td>0.097462</td>\n      <td>-2.881803</td>\n      <td>2.804097</td>\n      <td>-2.420821</td>\n      <td>0.795292</td>\n      <td>0.914762</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>1</td>\n      <td>2262</td>\n      <td>20030301</td>\n      <td>40.0</td>\n      <td>1</td>\n      <td>2.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0</td>\n      <td>15.0</td>\n      <td>...</td>\n      <td>0.264777</td>\n      <td>0.121004</td>\n      <td>0.135731</td>\n      <td>0.026597</td>\n      <td>0.020582</td>\n      <td>-4.900482</td>\n      <td>2.096338</td>\n      <td>-1.030483</td>\n      <td>-1.722674</td>\n      <td>0.245522</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2</td>\n      <td>14874</td>\n      <td>20040403</td>\n      <td>115.0</td>\n      <td>15</td>\n      <td>1.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>163</td>\n      <td>12.5</td>\n      <td>...</td>\n      <td>0.251410</td>\n      <td>0.114912</td>\n      <td>0.165147</td>\n      <td>0.062173</td>\n      <td>0.027075</td>\n      <td>-4.846749</td>\n      <td>1.803559</td>\n      <td>1.565330</td>\n      <td>-0.832687</td>\n      <td>-0.229963</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>3</td>\n      <td>71865</td>\n      <td>19960908</td>\n      <td>109.0</td>\n      <td>10</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>1.0</td>\n      <td>193</td>\n      <td>15.0</td>\n      <td>...</td>\n      <td>0.274293</td>\n      <td>0.110300</td>\n      <td>0.121964</td>\n      <td>0.033395</td>\n      <td>0.000000</td>\n      <td>-4.509599</td>\n      <td>1.285940</td>\n      <td>-0.501868</td>\n      <td>-2.438353</td>\n      <td>-0.478699</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>4</td>\n      <td>111080</td>\n      <td>20120103</td>\n      <td>110.0</td>\n      <td>5</td>\n      <td>1.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>68</td>\n      <td>5.0</td>\n      <td>...</td>\n      <td>0.228036</td>\n      <td>0.073205</td>\n      <td>0.091880</td>\n      <td>0.078819</td>\n      <td>0.121534</td>\n      <td>-1.896240</td>\n      <td>0.910783</td>\n      <td>0.931110</td>\n      <td>2.834518</td>\n      <td>1.923482</td>\n    </tr>\n  </tbody>\n</table>\n<p>5 rows × 31 columns</p>\n</div>"
     },
     "metadata": {},
     "execution_count": 4
    }
   ],
   "source": [
    "## 通过.head() 简要浏览读取数据的形式\n",
    "Train_data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": "<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 150000 entries, 0 to 149999\nData columns (total 31 columns):\n #   Column             Non-Null Count   Dtype  \n---  ------             --------------   -----  \n 0   SaleID             150000 non-null  int64  \n 1   name               150000 non-null  int64  \n 2   regDate            150000 non-null  int64  \n 3   model              149999 non-null  float64\n 4   brand              150000 non-null  int64  \n 5   bodyType           145494 non-null  float64\n 6   fuelType           141320 non-null  float64\n 7   gearbox            144019 non-null  float64\n 8   power              150000 non-null  int64  \n 9   kilometer          150000 non-null  float64\n 10  notRepairedDamage  150000 non-null  object \n 11  regionCode         150000 non-null  int64  \n 12  seller             150000 non-null  int64  \n 13  offerType          150000 non-null  int64  \n 14  creatDate          150000 non-null  int64  \n 15  price              150000 non-null  int64  \n 16  v_0                150000 non-null  float64\n 17  v_1                150000 non-null  float64\n 18  v_2                150000 non-null  float64\n 19  v_3                150000 non-null  float64\n 20  v_4                150000 non-null  float64\n 21  v_5                150000 non-null  float64\n 22  v_6                150000 non-null  float64\n 23  v_7                150000 non-null  float64\n 24  v_8                150000 non-null  float64\n 25  v_9                150000 non-null  float64\n 26  v_10               150000 non-null  float64\n 27  v_11               150000 non-null  float64\n 28  v_12               150000 non-null  float64\n 29  v_13               150000 non-null  float64\n 30  v_14               150000 non-null  float64\ndtypes: float64(20), int64(10), object(1)\nmemory usage: 35.5+ MB\n"
    }
   ],
   "source": [
    "## 通过 .info() 简要可以看到对应一些数据列名，以及NAN缺失信息\n",
    "Train_data.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "Index(['SaleID', 'name', 'regDate', 'model', 'brand', 'bodyType', 'fuelType',\n       'gearbox', 'power', 'kilometer', 'notRepairedDamage', 'regionCode',\n       'seller', 'offerType', 'creatDate', 'price', 'v_0', 'v_1', 'v_2', 'v_3',\n       'v_4', 'v_5', 'v_6', 'v_7', 'v_8', 'v_9', 'v_10', 'v_11', 'v_12',\n       'v_13', 'v_14'],\n      dtype='object')"
     },
     "metadata": {},
     "execution_count": 6
    }
   ],
   "source": [
    "## 通过 .columns 查看列名\n",
    "Train_data.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": "<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 50000 entries, 0 to 49999\nData columns (total 30 columns):\n #   Column             Non-Null Count  Dtype  \n---  ------             --------------  -----  \n 0   SaleID             50000 non-null  int64  \n 1   name               50000 non-null  int64  \n 2   regDate            50000 non-null  int64  \n 3   model              50000 non-null  float64\n 4   brand              50000 non-null  int64  \n 5   bodyType           48587 non-null  float64\n 6   fuelType           47107 non-null  float64\n 7   gearbox            48090 non-null  float64\n 8   power              50000 non-null  int64  \n 9   kilometer          50000 non-null  float64\n 10  notRepairedDamage  50000 non-null  object \n 11  regionCode         50000 non-null  int64  \n 12  seller             50000 non-null  int64  \n 13  offerType          50000 non-null  int64  \n 14  creatDate          50000 non-null  int64  \n 15  v_0                50000 non-null  float64\n 16  v_1                50000 non-null  float64\n 17  v_2                50000 non-null  float64\n 18  v_3                50000 non-null  float64\n 19  v_4                50000 non-null  float64\n 20  v_5                50000 non-null  float64\n 21  v_6                50000 non-null  float64\n 22  v_7                50000 non-null  float64\n 23  v_8                50000 non-null  float64\n 24  v_9                50000 non-null  float64\n 25  v_10               50000 non-null  float64\n 26  v_11               50000 non-null  float64\n 27  v_12               50000 non-null  float64\n 28  v_13               50000 non-null  float64\n 29  v_14               50000 non-null  float64\ndtypes: float64(20), int64(9), object(1)\nmemory usage: 11.4+ MB\n"
    }
   ],
   "source": [
    "TestA_data.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "              SaleID           name       regDate          model  \\\ncount  150000.000000  150000.000000  1.500000e+05  149999.000000   \nmean    74999.500000   68349.172873  2.003417e+07      47.129021   \nstd     43301.414527   61103.875095  5.364988e+04      49.536040   \nmin         0.000000       0.000000  1.991000e+07       0.000000   \n25%     37499.750000   11156.000000  1.999091e+07      10.000000   \n50%     74999.500000   51638.000000  2.003091e+07      30.000000   \n75%    112499.250000  118841.250000  2.007111e+07      66.000000   \nmax    149999.000000  196812.000000  2.015121e+07     247.000000   \n\n               brand       bodyType       fuelType        gearbox  \\\ncount  150000.000000  145494.000000  141320.000000  144019.000000   \nmean        8.052733       1.792369       0.375842       0.224943   \nstd         7.864956       1.760640       0.548677       0.417546   \nmin         0.000000       0.000000       0.000000       0.000000   \n25%         1.000000       0.000000       0.000000       0.000000   \n50%         6.000000       1.000000       0.000000       0.000000   \n75%        13.000000       3.000000       1.000000       0.000000   \nmax        39.000000       7.000000       6.000000       1.000000   \n\n               power      kilometer  ...            v_5            v_6  \\\ncount  150000.000000  150000.000000  ...  150000.000000  150000.000000   \nmean      119.316547      12.597160  ...       0.248204       0.044923   \nstd       177.168419       3.919576  ...       0.045804       0.051743   \nmin         0.000000       0.500000  ...       0.000000       0.000000   \n25%        75.000000      12.500000  ...       0.243615       0.000038   \n50%       110.000000      15.000000  ...       0.257798       0.000812   \n75%       150.000000      15.000000  ...       0.265297       0.102009   \nmax     19312.000000      15.000000  ...       0.291838       0.151420   \n\n                 v_7            v_8            v_9           v_10  \\\ncount  150000.000000  150000.000000  150000.000000  150000.000000   \nmean        0.124692       0.058144       0.061996      -0.001000   \nstd         0.201410       0.029186       0.035692       3.772386   \nmin         0.000000       0.000000       0.000000      -9.168192   \n25%         0.062474       0.035334       0.033930      -3.722303   \n50%         0.095866       0.057014       0.058484       1.624076   \n75%         0.125243       0.079382       0.087491       2.844357   \nmax         1.404936       0.160791       0.222787      12.357011   \n\n                v_11           v_12           v_13           v_14  \ncount  150000.000000  150000.000000  150000.000000  150000.000000  \nmean        0.009035       0.004813       0.000313      -0.000688  \nstd         3.286071       2.517478       1.288988       1.038685  \nmin        -5.558207      -9.639552      -4.153899      -6.546556  \n25%        -1.951543      -1.871846      -1.057789      -0.437034  \n50%        -0.358053      -0.130753      -0.036245       0.141246  \n75%         1.255022       1.776933       0.942813       0.680378  \nmax        18.819042      13.847792      11.147669       8.658418  \n\n[8 rows x 30 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>SaleID</th>\n      <th>name</th>\n      <th>regDate</th>\n      <th>model</th>\n      <th>brand</th>\n      <th>bodyType</th>\n      <th>fuelType</th>\n      <th>gearbox</th>\n      <th>power</th>\n      <th>kilometer</th>\n      <th>...</th>\n      <th>v_5</th>\n      <th>v_6</th>\n      <th>v_7</th>\n      <th>v_8</th>\n      <th>v_9</th>\n      <th>v_10</th>\n      <th>v_11</th>\n      <th>v_12</th>\n      <th>v_13</th>\n      <th>v_14</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>count</th>\n      <td>150000.000000</td>\n      <td>150000.000000</td>\n      <td>1.500000e+05</td>\n      <td>149999.000000</td>\n      <td>150000.000000</td>\n      <td>145494.000000</td>\n      <td>141320.000000</td>\n      <td>144019.000000</td>\n      <td>150000.000000</td>\n      <td>150000.000000</td>\n      <td>...</td>\n      <td>150000.000000</td>\n      <td>150000.000000</td>\n      <td>150000.000000</td>\n      <td>150000.000000</td>\n      <td>150000.000000</td>\n      <td>150000.000000</td>\n      <td>150000.000000</td>\n      <td>150000.000000</td>\n      <td>150000.000000</td>\n      <td>150000.000000</td>\n    </tr>\n    <tr>\n      <th>mean</th>\n      <td>74999.500000</td>\n      <td>68349.172873</td>\n      <td>2.003417e+07</td>\n      <td>47.129021</td>\n      <td>8.052733</td>\n      <td>1.792369</td>\n      <td>0.375842</td>\n      <td>0.224943</td>\n      <td>119.316547</td>\n      <td>12.597160</td>\n      <td>...</td>\n      <td>0.248204</td>\n      <td>0.044923</td>\n      <td>0.124692</td>\n      <td>0.058144</td>\n      <td>0.061996</td>\n      <td>-0.001000</td>\n      <td>0.009035</td>\n      <td>0.004813</td>\n      <td>0.000313</td>\n      <td>-0.000688</td>\n    </tr>\n    <tr>\n      <th>std</th>\n      <td>43301.414527</td>\n      <td>61103.875095</td>\n      <td>5.364988e+04</td>\n      <td>49.536040</td>\n      <td>7.864956</td>\n      <td>1.760640</td>\n      <td>0.548677</td>\n      <td>0.417546</td>\n      <td>177.168419</td>\n      <td>3.919576</td>\n      <td>...</td>\n      <td>0.045804</td>\n      <td>0.051743</td>\n      <td>0.201410</td>\n      <td>0.029186</td>\n      <td>0.035692</td>\n      <td>3.772386</td>\n      <td>3.286071</td>\n      <td>2.517478</td>\n      <td>1.288988</td>\n      <td>1.038685</td>\n    </tr>\n    <tr>\n      <th>min</th>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>1.991000e+07</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.500000</td>\n      <td>...</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>-9.168192</td>\n      <td>-5.558207</td>\n      <td>-9.639552</td>\n      <td>-4.153899</td>\n      <td>-6.546556</td>\n    </tr>\n    <tr>\n      <th>25%</th>\n      <td>37499.750000</td>\n      <td>11156.000000</td>\n      <td>1.999091e+07</td>\n      <td>10.000000</td>\n      <td>1.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>75.000000</td>\n      <td>12.500000</td>\n      <td>...</td>\n      <td>0.243615</td>\n      <td>0.000038</td>\n      <td>0.062474</td>\n      <td>0.035334</td>\n      <td>0.033930</td>\n      <td>-3.722303</td>\n      <td>-1.951543</td>\n      <td>-1.871846</td>\n      <td>-1.057789</td>\n      <td>-0.437034</td>\n    </tr>\n    <tr>\n      <th>50%</th>\n      <td>74999.500000</td>\n      <td>51638.000000</td>\n      <td>2.003091e+07</td>\n      <td>30.000000</td>\n      <td>6.000000</td>\n      <td>1.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>110.000000</td>\n      <td>15.000000</td>\n      <td>...</td>\n      <td>0.257798</td>\n      <td>0.000812</td>\n      <td>0.095866</td>\n      <td>0.057014</td>\n      <td>0.058484</td>\n      <td>1.624076</td>\n      <td>-0.358053</td>\n      <td>-0.130753</td>\n      <td>-0.036245</td>\n      <td>0.141246</td>\n    </tr>\n    <tr>\n      <th>75%</th>\n      <td>112499.250000</td>\n      <td>118841.250000</td>\n      <td>2.007111e+07</td>\n      <td>66.000000</td>\n      <td>13.000000</td>\n      <td>3.000000</td>\n      <td>1.000000</td>\n      <td>0.000000</td>\n      <td>150.000000</td>\n      <td>15.000000</td>\n      <td>...</td>\n      <td>0.265297</td>\n      <td>0.102009</td>\n      <td>0.125243</td>\n      <td>0.079382</td>\n      <td>0.087491</td>\n      <td>2.844357</td>\n      <td>1.255022</td>\n      <td>1.776933</td>\n      <td>0.942813</td>\n      <td>0.680378</td>\n    </tr>\n    <tr>\n      <th>max</th>\n      <td>149999.000000</td>\n      <td>196812.000000</td>\n      <td>2.015121e+07</td>\n      <td>247.000000</td>\n      <td>39.000000</td>\n      <td>7.000000</td>\n      <td>6.000000</td>\n      <td>1.000000</td>\n      <td>19312.000000</td>\n      <td>15.000000</td>\n      <td>...</td>\n      <td>0.291838</td>\n      <td>0.151420</td>\n      <td>1.404936</td>\n      <td>0.160791</td>\n      <td>0.222787</td>\n      <td>12.357011</td>\n      <td>18.819042</td>\n      <td>13.847792</td>\n      <td>11.147669</td>\n      <td>8.658418</td>\n    </tr>\n  </tbody>\n</table>\n<p>8 rows × 30 columns</p>\n</div>"
     },
     "metadata": {},
     "execution_count": 8
    }
   ],
   "source": [
    "## 通过 .describe() 可以查看数值特征列的一些统计信息\n",
    "Train_data.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "              SaleID           name       regDate         model         brand  \\\ncount   50000.000000   50000.000000  5.000000e+04  50000.000000  50000.000000   \nmean   174999.500000   68542.223280  2.003393e+07     46.844520      8.056240   \nstd     14433.901067   61052.808133  5.368870e+04     49.469548      7.819477   \nmin    150000.000000       0.000000  1.991000e+07      0.000000      0.000000   \n25%    162499.750000   11203.500000  1.999091e+07     10.000000      1.000000   \n50%    174999.500000   52248.500000  2.003091e+07     29.000000      6.000000   \n75%    187499.250000  118856.500000  2.007110e+07     65.000000     13.000000   \nmax    199999.000000  196805.000000  2.015121e+07    246.000000     39.000000   \n\n           bodyType      fuelType       gearbox         power     kilometer  \\\ncount  48587.000000  47107.000000  48090.000000  50000.000000  50000.000000   \nmean       1.782185      0.373405      0.224350    119.883620     12.595580   \nstd        1.760736      0.546442      0.417158    185.097387      3.908979   \nmin        0.000000      0.000000      0.000000      0.000000      0.500000   \n25%        0.000000      0.000000      0.000000     75.000000     12.500000   \n50%        1.000000      0.000000      0.000000    109.000000     15.000000   \n75%        3.000000      1.000000      0.000000    150.000000     15.000000   \nmax        7.000000      6.000000      1.000000  20000.000000     15.000000   \n\n       ...           v_5           v_6           v_7           v_8  \\\ncount  ...  50000.000000  50000.000000  50000.000000  50000.000000   \nmean   ...      0.248669      0.045021      0.122744      0.057997   \nstd    ...      0.044601      0.051766      0.195972      0.029211   \nmin    ...      0.000000      0.000000      0.000000      0.000000   \n25%    ...      0.243762      0.000044      0.062644      0.035084   \n50%    ...      0.257877      0.000815      0.095828      0.057084   \n75%    ...      0.265328      0.102025      0.125438      0.079077   \nmax    ...      0.291618      0.153265      1.358813      0.156355   \n\n                v_9          v_10          v_11          v_12          v_13  \\\ncount  50000.000000  50000.000000  50000.000000  50000.000000  50000.000000   \nmean       0.062000     -0.017855     -0.013742     -0.013554     -0.003147   \nstd        0.035653      3.747985      3.231258      2.515962      1.286597   \nmin        0.000000     -9.160049     -5.411964     -8.916949     -4.123333   \n25%        0.033714     -3.700121     -1.971325     -1.876703     -1.060428   \n50%        0.058764      1.613212     -0.355843     -0.142779     -0.035956   \n75%        0.087489      2.832708      1.262914      1.764335      0.941469   \nmax        0.214775     12.338872     18.856218     12.950498      5.913273   \n\n               v_14  \ncount  50000.000000  \nmean       0.001516  \nstd        1.027360  \nmin       -6.112667  \n25%       -0.437920  \n50%        0.138799  \n75%        0.681163  \nmax        2.624622  \n\n[8 rows x 29 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>SaleID</th>\n      <th>name</th>\n      <th>regDate</th>\n      <th>model</th>\n      <th>brand</th>\n      <th>bodyType</th>\n      <th>fuelType</th>\n      <th>gearbox</th>\n      <th>power</th>\n      <th>kilometer</th>\n      <th>...</th>\n      <th>v_5</th>\n      <th>v_6</th>\n      <th>v_7</th>\n      <th>v_8</th>\n      <th>v_9</th>\n      <th>v_10</th>\n      <th>v_11</th>\n      <th>v_12</th>\n      <th>v_13</th>\n      <th>v_14</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>count</th>\n      <td>50000.000000</td>\n      <td>50000.000000</td>\n      <td>5.000000e+04</td>\n      <td>50000.000000</td>\n      <td>50000.000000</td>\n      <td>48587.000000</td>\n      <td>47107.000000</td>\n      <td>48090.000000</td>\n      <td>50000.000000</td>\n      <td>50000.000000</td>\n      <td>...</td>\n      <td>50000.000000</td>\n      <td>50000.000000</td>\n      <td>50000.000000</td>\n      <td>50000.000000</td>\n      <td>50000.000000</td>\n      <td>50000.000000</td>\n      <td>50000.000000</td>\n      <td>50000.000000</td>\n      <td>50000.000000</td>\n      <td>50000.000000</td>\n    </tr>\n    <tr>\n      <th>mean</th>\n      <td>174999.500000</td>\n      <td>68542.223280</td>\n      <td>2.003393e+07</td>\n      <td>46.844520</td>\n      <td>8.056240</td>\n      <td>1.782185</td>\n      <td>0.373405</td>\n      <td>0.224350</td>\n      <td>119.883620</td>\n      <td>12.595580</td>\n      <td>...</td>\n      <td>0.248669</td>\n      <td>0.045021</td>\n      <td>0.122744</td>\n      <td>0.057997</td>\n      <td>0.062000</td>\n      <td>-0.017855</td>\n      <td>-0.013742</td>\n      <td>-0.013554</td>\n      <td>-0.003147</td>\n      <td>0.001516</td>\n    </tr>\n    <tr>\n      <th>std</th>\n      <td>14433.901067</td>\n      <td>61052.808133</td>\n      <td>5.368870e+04</td>\n      <td>49.469548</td>\n      <td>7.819477</td>\n      <td>1.760736</td>\n      <td>0.546442</td>\n      <td>0.417158</td>\n      <td>185.097387</td>\n      <td>3.908979</td>\n      <td>...</td>\n      <td>0.044601</td>\n      <td>0.051766</td>\n      <td>0.195972</td>\n      <td>0.029211</td>\n      <td>0.035653</td>\n      <td>3.747985</td>\n      <td>3.231258</td>\n      <td>2.515962</td>\n      <td>1.286597</td>\n      <td>1.027360</td>\n    </tr>\n    <tr>\n      <th>min</th>\n      <td>150000.000000</td>\n      <td>0.000000</td>\n      <td>1.991000e+07</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.500000</td>\n      <td>...</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>-9.160049</td>\n      <td>-5.411964</td>\n      <td>-8.916949</td>\n      <td>-4.123333</td>\n      <td>-6.112667</td>\n    </tr>\n    <tr>\n      <th>25%</th>\n      <td>162499.750000</td>\n      <td>11203.500000</td>\n      <td>1.999091e+07</td>\n      <td>10.000000</td>\n      <td>1.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>75.000000</td>\n      <td>12.500000</td>\n      <td>...</td>\n      <td>0.243762</td>\n      <td>0.000044</td>\n      <td>0.062644</td>\n      <td>0.035084</td>\n      <td>0.033714</td>\n      <td>-3.700121</td>\n      <td>-1.971325</td>\n      <td>-1.876703</td>\n      <td>-1.060428</td>\n      <td>-0.437920</td>\n    </tr>\n    <tr>\n      <th>50%</th>\n      <td>174999.500000</td>\n      <td>52248.500000</td>\n      <td>2.003091e+07</td>\n      <td>29.000000</td>\n      <td>6.000000</td>\n      <td>1.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>109.000000</td>\n      <td>15.000000</td>\n      <td>...</td>\n      <td>0.257877</td>\n      <td>0.000815</td>\n      <td>0.095828</td>\n      <td>0.057084</td>\n      <td>0.058764</td>\n      <td>1.613212</td>\n      <td>-0.355843</td>\n      <td>-0.142779</td>\n      <td>-0.035956</td>\n      <td>0.138799</td>\n    </tr>\n    <tr>\n      <th>75%</th>\n      <td>187499.250000</td>\n      <td>118856.500000</td>\n      <td>2.007110e+07</td>\n      <td>65.000000</td>\n      <td>13.000000</td>\n      <td>3.000000</td>\n      <td>1.000000</td>\n      <td>0.000000</td>\n      <td>150.000000</td>\n      <td>15.000000</td>\n      <td>...</td>\n      <td>0.265328</td>\n      <td>0.102025</td>\n      <td>0.125438</td>\n      <td>0.079077</td>\n      <td>0.087489</td>\n      <td>2.832708</td>\n      <td>1.262914</td>\n      <td>1.764335</td>\n      <td>0.941469</td>\n      <td>0.681163</td>\n    </tr>\n    <tr>\n      <th>max</th>\n      <td>199999.000000</td>\n      <td>196805.000000</td>\n      <td>2.015121e+07</td>\n      <td>246.000000</td>\n      <td>39.000000</td>\n      <td>7.000000</td>\n      <td>6.000000</td>\n      <td>1.000000</td>\n      <td>20000.000000</td>\n      <td>15.000000</td>\n      <td>...</td>\n      <td>0.291618</td>\n      <td>0.153265</td>\n      <td>1.358813</td>\n      <td>0.156355</td>\n      <td>0.214775</td>\n      <td>12.338872</td>\n      <td>18.856218</td>\n      <td>12.950498</td>\n      <td>5.913273</td>\n      <td>2.624622</td>\n    </tr>\n  </tbody>\n</table>\n<p>8 rows × 29 columns</p>\n</div>"
     },
     "metadata": {},
     "execution_count": 9
    }
   ],
   "source": [
    "TestA_data.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": "Index(['SaleID', 'name', 'regDate', 'model', 'brand', 'bodyType', 'fuelType',\n       'gearbox', 'power', 'kilometer', 'regionCode', 'seller', 'offerType',\n       'creatDate', 'price', 'v_0', 'v_1', 'v_2', 'v_3', 'v_4', 'v_5', 'v_6',\n       'v_7', 'v_8', 'v_9', 'v_10', 'v_11', 'v_12', 'v_13', 'v_14'],\n      dtype='object')\n"
    }
   ],
   "source": [
    "numerical_cols = Train_data.select_dtypes(exclude = 'object').columns\n",
    "print(numerical_cols)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": "Index(['notRepairedDamage'], dtype='object')\n"
    }
   ],
   "source": [
    "categorical_cols = Train_data.select_dtypes(include = 'object').columns\n",
    "print(categorical_cols)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": "X train shape: (150000, 18)\nX test shape: (50000, 18)\n"
    }
   ],
   "source": [
    "## 选择特征列\n",
    "feature_cols = [col for col in numerical_cols if col not in ['SaleID','name','regDate','creatDate','price','model','brand','regionCode','seller']]\n",
    "feature_cols = [col for col in feature_cols if 'Type' not in col]\n",
    "\n",
    "## 提前特征列，标签列构造训练样本和测试样本\n",
    "X_data = Train_data[feature_cols]\n",
    "Y_data = Train_data['price']\n",
    "\n",
    "X_test  = TestA_data[feature_cols]\n",
    "\n",
    "print('X train shape:',X_data.shape)\n",
    "print('X test shape:',X_test.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "## 定义了一个统计函数，方便后续信息统计\n",
    "def Sta_inf(data):\n",
    "    print('_min',np.min(data))\n",
    "    print('_max:',np.max(data))\n",
    "    print('_mean',np.mean(data))\n",
    "    print('_ptp',np.ptp(data))\n",
    "    print('_std',np.std(data))\n",
    "    print('_var',np.var(data))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": "Sta of label:\n_min 11\n_max: 99999\n_mean 5923.327333333334\n_ptp 99988\n_std 7501.973469876635\n_var 56279605.942732885\n"
    }
   ],
   "source": [
    "print('Sta of label:')\n",
    "Sta_inf(Y_data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"248.518125pt\" version=\"1.1\" viewBox=\"0 0 398.247362 248.518125\" width=\"398.247362pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 248.518125 \nL 398.247362 248.518125 \nL 398.247362 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 52.375 224.64 \nL 387.175 224.64 \nL 387.175 7.2 \nL 52.375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path clip-path=\"url(#pf5e2ca8058)\" d=\"M 67.593182 224.64 \nL 98.029545 224.64 \nL 98.029545 17.554286 \nL 67.593182 17.554286 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path clip-path=\"url(#pf5e2ca8058)\" d=\"M 98.029545 224.64 \nL 128.465909 224.64 \nL 128.465909 193.007058 \nL 98.029545 193.007058 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path clip-path=\"url(#pf5e2ca8058)\" d=\"M 128.465909 224.64 \nL 158.902273 224.64 \nL 158.902273 216.420482 \nL 128.465909 216.420482 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path clip-path=\"url(#pf5e2ca8058)\" d=\"M 158.902273 224.64 \nL 189.338636 224.64 \nL 189.338636 222.400441 \nL 158.902273 222.400441 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_7\">\n    <path clip-path=\"url(#pf5e2ca8058)\" d=\"M 189.338636 224.64 \nL 219.775 224.64 \nL 219.775 223.852812 \nL 189.338636 223.852812 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_8\">\n    <path clip-path=\"url(#pf5e2ca8058)\" d=\"M 219.775 224.64 \nL 250.211364 224.64 \nL 250.211364 224.325793 \nL 219.775 224.325793 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_9\">\n    <path clip-path=\"url(#pf5e2ca8058)\" d=\"M 250.211364 224.64 \nL 280.647727 224.64 \nL 280.647727 224.432757 \nL 250.211364 224.432757 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_10\">\n    <path clip-path=\"url(#pf5e2ca8058)\" d=\"M 280.647727 224.64 \nL 311.084091 224.64 \nL 311.084091 224.539721 \nL 280.647727 224.539721 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_11\">\n    <path clip-path=\"url(#pf5e2ca8058)\" d=\"M 311.084091 224.64 \nL 341.520455 224.64 \nL 341.520455 224.559777 \nL 311.084091 224.559777 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_12\">\n    <path clip-path=\"url(#pf5e2ca8058)\" d=\"M 341.520455 224.64 \nL 371.956818 224.64 \nL 371.956818 224.609916 \nL 341.520455 224.609916 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"mfdc950b1f9\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"67.559698\" xlink:href=\"#mfdc950b1f9\" y=\"224.64\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(64.378448 239.238437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"128.439731\" xlink:href=\"#mfdc950b1f9\" y=\"224.64\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 20000 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(112.533481 239.238437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"189.319764\" xlink:href=\"#mfdc950b1f9\" y=\"224.64\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 40000 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(173.413514 239.238437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"250.199796\" xlink:href=\"#mfdc950b1f9\" y=\"224.64\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 60000 -->\n      <defs>\n       <path d=\"M 33.015625 40.375 \nQ 26.375 40.375 22.484375 35.828125 \nQ 18.609375 31.296875 18.609375 23.390625 \nQ 18.609375 15.53125 22.484375 10.953125 \nQ 26.375 6.390625 33.015625 6.390625 \nQ 39.65625 6.390625 43.53125 10.953125 \nQ 47.40625 15.53125 47.40625 23.390625 \nQ 47.40625 31.296875 43.53125 35.828125 \nQ 39.65625 40.375 33.015625 40.375 \nz\nM 52.59375 71.296875 \nL 52.59375 62.3125 \nQ 48.875 64.0625 45.09375 64.984375 \nQ 41.3125 65.921875 37.59375 65.921875 \nQ 27.828125 65.921875 22.671875 59.328125 \nQ 17.53125 52.734375 16.796875 39.40625 \nQ 19.671875 43.65625 24.015625 45.921875 \nQ 28.375 48.1875 33.59375 48.1875 \nQ 44.578125 48.1875 50.953125 41.515625 \nQ 57.328125 34.859375 57.328125 23.390625 \nQ 57.328125 12.15625 50.6875 5.359375 \nQ 44.046875 -1.421875 33.015625 -1.421875 \nQ 20.359375 -1.421875 13.671875 8.265625 \nQ 6.984375 17.96875 6.984375 36.375 \nQ 6.984375 53.65625 15.1875 63.9375 \nQ 23.390625 74.21875 37.203125 74.21875 \nQ 40.921875 74.21875 44.703125 73.484375 \nQ 48.484375 72.75 52.59375 71.296875 \nz\n\" id=\"DejaVuSans-54\"/>\n      </defs>\n      <g transform=\"translate(234.293546 239.238437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-54\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"311.079829\" xlink:href=\"#mfdc950b1f9\" y=\"224.64\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 80000 -->\n      <defs>\n       <path d=\"M 31.78125 34.625 \nQ 24.75 34.625 20.71875 30.859375 \nQ 16.703125 27.09375 16.703125 20.515625 \nQ 16.703125 13.921875 20.71875 10.15625 \nQ 24.75 6.390625 31.78125 6.390625 \nQ 38.8125 6.390625 42.859375 10.171875 \nQ 46.921875 13.96875 46.921875 20.515625 \nQ 46.921875 27.09375 42.890625 30.859375 \nQ 38.875 34.625 31.78125 34.625 \nz\nM 21.921875 38.8125 \nQ 15.578125 40.375 12.03125 44.71875 \nQ 8.5 49.078125 8.5 55.328125 \nQ 8.5 64.0625 14.71875 69.140625 \nQ 20.953125 74.21875 31.78125 74.21875 \nQ 42.671875 74.21875 48.875 69.140625 \nQ 55.078125 64.0625 55.078125 55.328125 \nQ 55.078125 49.078125 51.53125 44.71875 \nQ 48 40.375 41.703125 38.8125 \nQ 48.828125 37.15625 52.796875 32.3125 \nQ 56.78125 27.484375 56.78125 20.515625 \nQ 56.78125 9.90625 50.3125 4.234375 \nQ 43.84375 -1.421875 31.78125 -1.421875 \nQ 19.734375 -1.421875 13.25 4.234375 \nQ 6.78125 9.90625 6.78125 20.515625 \nQ 6.78125 27.484375 10.78125 32.3125 \nQ 14.796875 37.15625 21.921875 38.8125 \nz\nM 18.3125 54.390625 \nQ 18.3125 48.734375 21.84375 45.5625 \nQ 25.390625 42.390625 31.78125 42.390625 \nQ 38.140625 42.390625 41.71875 45.5625 \nQ 45.3125 48.734375 45.3125 54.390625 \nQ 45.3125 60.0625 41.71875 63.234375 \nQ 38.140625 66.40625 31.78125 66.40625 \nQ 25.390625 66.40625 21.84375 63.234375 \nQ 18.3125 60.0625 18.3125 54.390625 \nz\n\" id=\"DejaVuSans-56\"/>\n      </defs>\n      <g transform=\"translate(295.173579 239.238437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-56\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_6\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"371.959862\" xlink:href=\"#mfdc950b1f9\" y=\"224.64\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- 100000 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(352.872362 239.238437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"318.115234\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_7\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m29b792e716\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"52.375\" xlink:href=\"#m29b792e716\" y=\"224.64\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0 -->\n      <g transform=\"translate(39.0125 228.439219)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"52.375\" xlink:href=\"#m29b792e716\" y=\"191.213739\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 20000 -->\n      <g transform=\"translate(13.5625 195.012958)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"52.375\" xlink:href=\"#m29b792e716\" y=\"157.787478\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 40000 -->\n      <g transform=\"translate(13.5625 161.586697)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"52.375\" xlink:href=\"#m29b792e716\" y=\"124.361217\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 60000 -->\n      <g transform=\"translate(13.5625 128.160436)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-54\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"52.375\" xlink:href=\"#m29b792e716\" y=\"90.934956\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 80000 -->\n      <g transform=\"translate(13.5625 94.734175)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-56\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_12\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"52.375\" xlink:href=\"#m29b792e716\" y=\"57.508695\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 100000 -->\n      <g transform=\"translate(7.2 61.307914)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"318.115234\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_7\">\n     <g id=\"line2d_13\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"52.375\" xlink:href=\"#m29b792e716\" y=\"24.082434\"/>\n      </g>\n     </g>\n     <g id=\"text_13\">\n      <!-- 120000 -->\n      <g transform=\"translate(7.2 27.881653)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"318.115234\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n   </g>\n   <g id=\"patch_13\">\n    <path d=\"M 52.375 224.64 \nL 52.375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_14\">\n    <path d=\"M 387.175 224.64 \nL 387.175 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_15\">\n    <path d=\"M 52.375 224.64 \nL 387.175 224.64 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_16\">\n    <path d=\"M 52.375 7.2 \nL 387.175 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pf5e2ca8058\">\n   <rect height=\"217.44\" width=\"334.8\" x=\"52.375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAD4CAYAAAAQP7oXAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAUtElEQVR4nO3dbaxd1Z3f8e+v9piQTIlNcCLGRrVRrGkd1DbEIs6kGkVhCoZEMS9AMhoVN0NlNSVtZlppYpoXqEmQSDsaUtSECQqemCiDoUxaLAJ1LSAaVQoEM6Q8E9+BFO7AhJsaGDpRHpz598VZNzm5Ptd3cY/h+OH7kY7O3v+99t5r333tn/fe6xynqpAkqcffmXQHJEnHDkNDktTN0JAkdTM0JEndDA1JUrelk+7AkXbaaafVmjVrJt0NSTqmPPjggz+oqpULtTvuQmPNmjXs27dv0t2QpGNKkv/T087bU5KkboaGJKmboSFJ6mZoSJK6GRqSpG6GhiSpm6EhSepmaEiS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XPr0+wxH7fnecgbcV7n28f8JvmQ62h6MRiR8F0GIyk+Nen+vMa+/xMGl5sPA99prwsZ3Mu9G9jf3k9t7cPgP7f6C+ARYMPQtn4HmGqvjw7VNwCPtnX+C3Mexk74+D/AL0ZPncngL4Mp4L8CJ7X6m9r8VFt+5tD6n2rH9RRDo4WOxt8J4B8D+9q5/u8MRskc1+cZ+A/Ak61fX2UwAuq4Os/AzQye2fyUwZXB5W/EeZ1vH4d7+TUikqRu3p6SJHUzNCRJ3QwNSVI3Q0OS1M3QkCR1MzQkSd0MDUlSt/8PIaSJCKRLnwsAAAAASUVORK5CYII=\n"
     },
     "metadata": {
      "needs_background": "light"
     }
    }
   ],
   "source": [
    "## 绘制标签的统计图，查看标签分布\n",
    "plt.hist(Y_data)\n",
    "plt.show()\n",
    "plt.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_data = X_data.fillna(-1)\n",
    "X_test = X_test.fillna(-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": "Train mae: 615.7464457286892\nVal mae 711.9293119709927\n"
    }
   ],
   "source": [
    "## xgb-Model\n",
    "xgr = xgb.XGBRegressor(n_estimators=120, learning_rate=0.1, gamma=0, subsample=0.8,\\\n",
    "        colsample_bytree=0.9, max_depth=7) #,objective ='reg:squarederror'\n",
    "\n",
    "scores_train = []\n",
    "scores = []\n",
    "\n",
    "## 5折交叉验证方式\n",
    "sk=StratifiedKFold(n_splits=5,shuffle=True,random_state=0)\n",
    "for train_ind,val_ind in sk.split(X_data,Y_data):\n",
    "    \n",
    "    train_x=X_data.iloc[train_ind].values\n",
    "    train_y=Y_data.iloc[train_ind]\n",
    "    val_x=X_data.iloc[val_ind].values\n",
    "    val_y=Y_data.iloc[val_ind]\n",
    "    \n",
    "    xgr.fit(train_x,train_y)\n",
    "    pred_train_xgb=xgr.predict(train_x)\n",
    "    pred_xgb=xgr.predict(val_x)\n",
    "    \n",
    "    score_train = mean_absolute_error(train_y,pred_train_xgb)\n",
    "    scores_train.append(score_train)\n",
    "    score = mean_absolute_error(val_y,pred_xgb)\n",
    "    scores.append(score)\n",
    "\n",
    "print('Train mae:',np.mean(score_train))\n",
    "print('Val mae',np.mean(scores))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "def build_model_xgb(x_train,y_train):\n",
    "    model = xgb.XGBRegressor(n_estimators=150, learning_rate=0.1, gamma=0, subsample=0.8,\\\n",
    "        colsample_bytree=0.9, max_depth=7) #, objective ='reg:squarederror'\n",
    "    model.fit(x_train, y_train)\n",
    "    return model\n",
    "\n",
    "def build_model_lgb(x_train,y_train):\n",
    "    estimator = lgb.LGBMRegressor(num_leaves=127,n_estimators = 150)\n",
    "    param_grid = {\n",
    "        'learning_rate': [0.01, 0.05, 0.1, 0.2],\n",
    "    }\n",
    "    gbm = GridSearchCV(estimator, param_grid)\n",
    "    gbm.fit(x_train, y_train)\n",
    "    return gbm"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "## Split data with val\n",
    "x_train,x_val,y_train,y_val = train_test_split(X_data,Y_data,test_size=0.3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": "Train lgb...\nMAE of val with lgb: 681.9375929435739\nPredict lgb...\nSta of Predict lgb:\n_min -519.1502598641224\n_max: 88575.10877210615\n_mean 5922.982425989068\n_ptp 89094.25903197027\n_std 7377.297141258001\n_var 54424513.11041347\n"
    }
   ],
   "source": [
    "print('Train lgb...')\n",
    "model_lgb = build_model_lgb(x_train,y_train)\n",
    "val_lgb = model_lgb.predict(x_val)\n",
    "MAE_lgb = mean_absolute_error(y_val,val_lgb)\n",
    "print('MAE of val with lgb:',MAE_lgb)\n",
    "\n",
    "print('Predict lgb...')\n",
    "model_lgb_pre = build_model_lgb(X_data,Y_data)\n",
    "subA_lgb = model_lgb_pre.predict(X_test)\n",
    "print('Sta of Predict lgb:')\n",
    "Sta_inf(subA_lgb)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": "Train xgb...\nMAE of val with xgb: 703.7389833512094\nPredict xgb...\nSta of Predict xgb:\n_min -296.5758\n_max: 91979.82\n_mean 5924.0674\n_ptp 92276.4\n_std 7358.011\n_var 54140330.0\n"
    }
   ],
   "source": [
    "print('Train xgb...')\n",
    "model_xgb = build_model_xgb(x_train,y_train)\n",
    "val_xgb = model_xgb.predict(x_val)\n",
    "MAE_xgb = mean_absolute_error(y_val,val_xgb)\n",
    "print('MAE of val with xgb:',MAE_xgb)\n",
    "\n",
    "print('Predict xgb...')\n",
    "model_xgb_pre = build_model_xgb(X_data,Y_data)\n",
    "subA_xgb = model_xgb_pre.predict(X_test)\n",
    "print('Sta of Predict xgb:')\n",
    "Sta_inf(subA_xgb)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": "MAE of val with Weighted ensemble: 677.0229001236476\n"
    }
   ],
   "source": [
    "## 这里我们采取了简单的加权融合的方式\n",
    "val_Weighted = (1-MAE_lgb/(MAE_xgb+MAE_lgb))*val_lgb+(1-MAE_xgb/(MAE_xgb+MAE_lgb))*val_xgb\n",
    "val_Weighted[val_Weighted<0]=10 # 由于我们发现预测的最小值有负数，而真实情况下，price为负是不存在的，由此我们进行对应的后修正\n",
    "print('MAE of val with Weighted ensemble:',mean_absolute_error(y_val,val_Weighted))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"248.518125pt\" version=\"1.1\" viewBox=\"0 0 398.247362 248.518125\" width=\"398.247362pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 248.518125 \nL 398.247362 248.518125 \nL 398.247362 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 52.375 224.64 \nL 387.175 224.64 \nL 387.175 7.2 \nL 52.375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path clip-path=\"url(#p6ef35c8b82)\" d=\"M 67.593182 224.64 \nL 98.029545 224.64 \nL 98.029545 17.554286 \nL 67.593182 17.554286 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path clip-path=\"url(#p6ef35c8b82)\" d=\"M 98.029545 224.64 \nL 128.465909 224.64 \nL 128.465909 193.007058 \nL 98.029545 193.007058 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path clip-path=\"url(#p6ef35c8b82)\" d=\"M 128.465909 224.64 \nL 158.902273 224.64 \nL 158.902273 216.420482 \nL 128.465909 216.420482 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path clip-path=\"url(#p6ef35c8b82)\" d=\"M 158.902273 224.64 \nL 189.338636 224.64 \nL 189.338636 222.400441 \nL 158.902273 222.400441 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_7\">\n    <path clip-path=\"url(#p6ef35c8b82)\" d=\"M 189.338636 224.64 \nL 219.775 224.64 \nL 219.775 223.852812 \nL 189.338636 223.852812 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_8\">\n    <path clip-path=\"url(#p6ef35c8b82)\" d=\"M 219.775 224.64 \nL 250.211364 224.64 \nL 250.211364 224.325793 \nL 219.775 224.325793 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_9\">\n    <path clip-path=\"url(#p6ef35c8b82)\" d=\"M 250.211364 224.64 \nL 280.647727 224.64 \nL 280.647727 224.432757 \nL 250.211364 224.432757 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_10\">\n    <path clip-path=\"url(#p6ef35c8b82)\" d=\"M 280.647727 224.64 \nL 311.084091 224.64 \nL 311.084091 224.539721 \nL 280.647727 224.539721 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_11\">\n    <path clip-path=\"url(#p6ef35c8b82)\" d=\"M 311.084091 224.64 \nL 341.520455 224.64 \nL 341.520455 224.559777 \nL 311.084091 224.559777 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"patch_12\">\n    <path clip-path=\"url(#p6ef35c8b82)\" d=\"M 341.520455 224.64 \nL 371.956818 224.64 \nL 371.956818 224.609916 \nL 341.520455 224.609916 \nz\n\" style=\"fill:#1f77b4;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m24ae388515\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"67.559698\" xlink:href=\"#m24ae388515\" y=\"224.64\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(64.378448 239.238437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"128.439731\" xlink:href=\"#m24ae388515\" y=\"224.64\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 20000 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(112.533481 239.238437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"189.319764\" xlink:href=\"#m24ae388515\" y=\"224.64\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 40000 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(173.413514 239.238437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"250.199796\" xlink:href=\"#m24ae388515\" y=\"224.64\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 60000 -->\n      <defs>\n       <path d=\"M 33.015625 40.375 \nQ 26.375 40.375 22.484375 35.828125 \nQ 18.609375 31.296875 18.609375 23.390625 \nQ 18.609375 15.53125 22.484375 10.953125 \nQ 26.375 6.390625 33.015625 6.390625 \nQ 39.65625 6.390625 43.53125 10.953125 \nQ 47.40625 15.53125 47.40625 23.390625 \nQ 47.40625 31.296875 43.53125 35.828125 \nQ 39.65625 40.375 33.015625 40.375 \nz\nM 52.59375 71.296875 \nL 52.59375 62.3125 \nQ 48.875 64.0625 45.09375 64.984375 \nQ 41.3125 65.921875 37.59375 65.921875 \nQ 27.828125 65.921875 22.671875 59.328125 \nQ 17.53125 52.734375 16.796875 39.40625 \nQ 19.671875 43.65625 24.015625 45.921875 \nQ 28.375 48.1875 33.59375 48.1875 \nQ 44.578125 48.1875 50.953125 41.515625 \nQ 57.328125 34.859375 57.328125 23.390625 \nQ 57.328125 12.15625 50.6875 5.359375 \nQ 44.046875 -1.421875 33.015625 -1.421875 \nQ 20.359375 -1.421875 13.671875 8.265625 \nQ 6.984375 17.96875 6.984375 36.375 \nQ 6.984375 53.65625 15.1875 63.9375 \nQ 23.390625 74.21875 37.203125 74.21875 \nQ 40.921875 74.21875 44.703125 73.484375 \nQ 48.484375 72.75 52.59375 71.296875 \nz\n\" id=\"DejaVuSans-54\"/>\n      </defs>\n      <g transform=\"translate(234.293546 239.238437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-54\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"311.079829\" xlink:href=\"#m24ae388515\" y=\"224.64\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 80000 -->\n      <defs>\n       <path d=\"M 31.78125 34.625 \nQ 24.75 34.625 20.71875 30.859375 \nQ 16.703125 27.09375 16.703125 20.515625 \nQ 16.703125 13.921875 20.71875 10.15625 \nQ 24.75 6.390625 31.78125 6.390625 \nQ 38.8125 6.390625 42.859375 10.171875 \nQ 46.921875 13.96875 46.921875 20.515625 \nQ 46.921875 27.09375 42.890625 30.859375 \nQ 38.875 34.625 31.78125 34.625 \nz\nM 21.921875 38.8125 \nQ 15.578125 40.375 12.03125 44.71875 \nQ 8.5 49.078125 8.5 55.328125 \nQ 8.5 64.0625 14.71875 69.140625 \nQ 20.953125 74.21875 31.78125 74.21875 \nQ 42.671875 74.21875 48.875 69.140625 \nQ 55.078125 64.0625 55.078125 55.328125 \nQ 55.078125 49.078125 51.53125 44.71875 \nQ 48 40.375 41.703125 38.8125 \nQ 48.828125 37.15625 52.796875 32.3125 \nQ 56.78125 27.484375 56.78125 20.515625 \nQ 56.78125 9.90625 50.3125 4.234375 \nQ 43.84375 -1.421875 31.78125 -1.421875 \nQ 19.734375 -1.421875 13.25 4.234375 \nQ 6.78125 9.90625 6.78125 20.515625 \nQ 6.78125 27.484375 10.78125 32.3125 \nQ 14.796875 37.15625 21.921875 38.8125 \nz\nM 18.3125 54.390625 \nQ 18.3125 48.734375 21.84375 45.5625 \nQ 25.390625 42.390625 31.78125 42.390625 \nQ 38.140625 42.390625 41.71875 45.5625 \nQ 45.3125 48.734375 45.3125 54.390625 \nQ 45.3125 60.0625 41.71875 63.234375 \nQ 38.140625 66.40625 31.78125 66.40625 \nQ 25.390625 66.40625 21.84375 63.234375 \nQ 18.3125 60.0625 18.3125 54.390625 \nz\n\" id=\"DejaVuSans-56\"/>\n      </defs>\n      <g transform=\"translate(295.173579 239.238437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-56\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_6\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"371.959862\" xlink:href=\"#m24ae388515\" y=\"224.64\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- 100000 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(352.872362 239.238437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"318.115234\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_7\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"md0f956730d\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"52.375\" xlink:href=\"#md0f956730d\" y=\"224.64\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0 -->\n      <g transform=\"translate(39.0125 228.439219)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"52.375\" xlink:href=\"#md0f956730d\" y=\"191.213739\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 20000 -->\n      <g transform=\"translate(13.5625 195.012958)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"52.375\" xlink:href=\"#md0f956730d\" y=\"157.787478\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 40000 -->\n      <g transform=\"translate(13.5625 161.586697)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"52.375\" xlink:href=\"#md0f956730d\" y=\"124.361217\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 60000 -->\n      <g transform=\"translate(13.5625 128.160436)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-54\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"52.375\" xlink:href=\"#md0f956730d\" y=\"90.934956\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 80000 -->\n      <g transform=\"translate(13.5625 94.734175)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-56\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_12\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"52.375\" xlink:href=\"#md0f956730d\" y=\"57.508695\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 100000 -->\n      <g transform=\"translate(7.2 61.307914)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"318.115234\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_7\">\n     <g id=\"line2d_13\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"52.375\" xlink:href=\"#md0f956730d\" y=\"24.082434\"/>\n      </g>\n     </g>\n     <g id=\"text_13\">\n      <!-- 120000 -->\n      <g transform=\"translate(7.2 27.881653)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"254.492188\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"318.115234\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n   </g>\n   <g id=\"patch_13\">\n    <path d=\"M 52.375 224.64 \nL 52.375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_14\">\n    <path d=\"M 387.175 224.64 \nL 387.175 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_15\">\n    <path d=\"M 52.375 224.64 \nL 387.175 224.64 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_16\">\n    <path d=\"M 52.375 7.2 \nL 387.175 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p6ef35c8b82\">\n   <rect height=\"217.44\" width=\"334.8\" x=\"52.375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n",
      "image/png": "iVB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vFxVB9v8cD9/fmxt+Sut/Wv9WUzSmcAM8MftltyXk7yF4/g8V9VfAn8APAu8wOC8PcjxfZ5nvRHndb59zMvQGOj6upKjXZJfBf4U+N2q+uvDNR1Rq0XUJybJh4EXq+rB4fKIprXAsmPmmBn8y/ls4PqqejfwNwxuKcznmD/mdo99M4NbSr8GvAW4YETT4+k8L2Six2hoDBzzX1eS5FcYBMbXqurrrfz9JKe35acDL7b6fMd7uPrqEfVJej/wkSTfA3YxuEX1eWB5ktkPrQ738+fH1pa/FTjAa/9ZTNI0MF1V97f52xiEyPF8nn8LeKaqZqrqp8DXgd/g+D7Ps96I8zrfPuZlaAwc019X0kZC3Ag8UVV/OLRoNzA7gmIrg2cds/XL2iiMjcAr7dJ0D3BekhXtX3jnMbjf+wLwapKNbV+XDW1rIqrqyqpaXVVrGJyve6rqt4F7gYtbs7nHPPuzuLi1r1bf0kbdrAXWMXhoeNT9TlTVXwHPJfn1VjqXwX8TcNyeZwa3pTYmeXPr0+wxH7fnecgbcV7n28f8JvmQ62h6MRiR8F0GIyk+Nen+vMa+/xMGl5sPA99prwsZ3Mu9G9jf3k9t7cPgP7f6C+ARYMPQtn4HmGqvjw7VNwCPtnX+C3Mexk74+D/AL0ZPncngL4Mp4L8CJ7X6m9r8VFt+5tD6n2rH9RRDo4WOxt8J4B8D+9q5/u8MRskc1+cZ+A/Ak61fX2UwAuq4Os/AzQye2fyUwZXB5W/EeZ1vH4d7+TUikqRu3p6SJHUzNCRJ3QwNSVI3Q0OS1M3QkCR1MzQkSd0MDUlSt/8PIaSJCKRLnwsAAAAASUVORK5CYII=\n"
     },
     "metadata": {
      "needs_background": "light"
     }
    }
   ],
   "source": [
    "sub_Weighted = (1-MAE_lgb/(MAE_xgb+MAE_lgb))*subA_lgb+(1-MAE_xgb/(MAE_xgb+MAE_lgb))*subA_xgb\n",
    "\n",
    "## 查看预测值的统计进行\n",
    "plt.hist(Y_data)\n",
    "plt.show()\n",
    "plt.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "sub = pd.DataFrame()\n",
    "sub['SaleID'] = TestA_data.SaleID\n",
    "sub['price'] = sub_Weighted\n",
    "sub.to_csv('./sub_Weighted.csv',index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "   SaleID         price\n0  150000  39490.197562\n1  150001    379.551185\n2  150002   8040.713595\n3  150003  12031.100553\n4  150004    571.985185",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>SaleID</th>\n      <th>price</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>150000</td>\n      <td>39490.197562</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>150001</td>\n      <td>379.551185</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>150002</td>\n      <td>8040.713595</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>150003</td>\n      <td>12031.100553</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>150004</td>\n      <td>571.985185</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 27
    }
   ],
   "source": [
    "sub.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ]
}